package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.DeviceDataPageReqDto;
import com.zzyl.service.DeviceDataService;
import com.zzyl.vo.DeviceDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * wangcong
 * 2025/2/13 10:18
 */
@RestController
@RequestMapping("/device-data")
public class DeviceDataController {

    @Autowired
    DeviceDataService deviceDataService;


    @GetMapping("/get-page")
    public ResponseResult<PageResponse<DeviceDataVo>> getDeviceDataPage(DeviceDataPageReqDto deviceDataPageReqDto) {
        PageResponse<DeviceDataVo> data = deviceDataService.queryPage(deviceDataPageReqDto);

        return ResponseResult.success(data);
    }
}
